package com.xiantianxia.lty.plan.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;

import com.xiantianxia.lty.plan.dao.PlanDao;
import com.xiantianxia.lty.plan.service.PlanService;
import com.xiantianxia.lty.plan.vo.PlanVo;


@Service
public class PlanServiceImpl implements PlanService {
	
	@Resource
	private PlanDao planDao;

	@Override
	public List<PlanVo> page(PlanVo plan) {
		List<PlanVo> list = planDao.list(plan);
        return list;
	}

	@Override
	public void batchInsert(List<PlanVo> dbs) {
		if(CollectionUtils.isNotEmpty(dbs)) {
			planDao.batchInsert(dbs);
		}
	}

	@Override
	public PlanVo getById(String planId) {
		return planDao.getById(planId);
	}

	@Override
	public void modify(PlanVo plan) {
		planDao.modify(plan);
	}

}
